package com.sun.aop.handler.set;

import com.sun.aop.annotation.HandlerType;
import com.sun.aop.handler.AbstractHandler;
import com.sun.aop.util.RedisUtil;
import com.sun.aop.util.SpringContextUtil;

/**
 * @Author 喻湘东
 * @Create 2019-09-22 18:20:34
 */
@HandlerType("set")
public class SetHandler extends AbstractHandler {

    private RedisUtil redisUtil= (RedisUtil) SpringContextUtil.getBean("redisUtil");

    @Override
    public <T> T get(String key) {
        return (T) redisUtil.get(key);
    }

    @Override
    public <T> T set(String key, String value, int expire) {

        return (T) redisUtil.set(key,value,expire);
    }
}
